package work04game;

public class Player {
    private int health;
    private int damage;
    private int power;
    private int defense;
    private int x;
    private int y;
    public Player() {
        health = 100;
        damage = 10;
        power = 50;
        defense = 2;
        x=0;
        y=0;
    }
    public void move(int newX, int newY) {
        x = newX;
        y = newY;
    }

    public int getDefense() {
        return defense;
    }

    public void setDefense(int defense) {
        this.defense = defense;
    }

    public int getHealth() {
        return health;
    }

    public void setHealth(int health) {
        this.health = health;
    }

    public int getDamage() {
        return damage;
    }

    public void setDamage(int damage) {
        this.damage = damage;
    }

    public int getPower() {
        return power;
    }

    public void setPower(int power) {
        this.power = power;
    }

    public int getX() {
        return x;
    }

    public void setX(int x) {
        this.x = x;
    }

    public int getY() {
        return y;
    }

    public void setY(int y) {
        this.y = y;
    }
    public void Attacked(int damage) {
        health -= damage;
    }
    public void treat(int damage) {
        health += damage;
    }
}
